<template>
  <div class="tuijian">
    <div class="" v-for="(item, index) in pageList" :key="index">
      <div>
        <h2 class="tui_jian">{{ item.title }}</h2>
        <div class="tuijian_wen">
          {{ item.page }}
        </div>
        <img :src="item.url" alt="" class="tuijian_img" />
        <div class="tuijian_wen">
          {{ item.page1 }}
        </div>
        <img :src="item.url1" alt="" class="tuijian_img" />
        <div class="tuijian_wen">
          {{ item.page2 }}
        </div>
        <img :src="item.url2" alt="" class="tuijian_img" />
        <div class="tuijian_wen">
          {{ item.page3 }}
        </div>
        <div class="tuijian_wen">
          {{ item.page4 }}
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { reqimage } from "../../api";
export default {
  data() {
    return {
      pageList: [],
      id: "",
    };
  },
  async created() {
    this.id = this.$route.params.id;
    let id = this.id;
    console.log(this);
    const res = await reqimage(id);
    this.pageList = res.data;
    console.log(this.pageList);
  },
  methods: {},
};
</script>

<style>
.tuijian {
  width: 100%;
  height: 50px;
  text-align: center;
  line-height: 50px;
  background-color: skyblue;
}
.tuijian_wen {
  width: 90%;
  margin: 0 5%;
  font-size: 14px;
  text-align: left;
}
.tuijian_img {
  display: block;
  width: 90%;
  margin: 0 5%;
}
.tui_jian {
  overflow: hidden; /*超出盒子宽度部分文字被隐藏*/
  text-overflow: ellipsis; /*当文本溢出包含元素时发生的事情 ellipsis*/
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  font-size: 16px;
  margin: 0 7%;
}
</style>
